package com.wangshouyu.mp.offiaccount.message;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import com.wangshouyu.mp.message.CardMessage;

import java.util.Objects;

/**
 * @author 王守钰
 * @date 2020年12月07日 13:49
 * @description 客服卡片消息
 */
public class KfCardMessage extends BaseKfMessage{

    @SerializedName(value = "wxcard")
    @JsonProperty(value = "wxcard")
    @JSONField(name = "wxcard")
    private CardMessage card;

    public CardMessage getCard() {
        return card;
    }

    public void setCard(CardMessage card) {
        this.card = card;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        KfCardMessage that = (KfCardMessage) o;
        return Objects.equals(card, that.card);
    }

    @Override
    public int hashCode() {
        return Objects.hash(card);
    }

    @Override
    public String toString() {
        return "KfCardMessage{" +
                "card=" + card +
                '}';
    }
}
